home *** CD-ROM | disk | FTP | other *** search
/ PsL Monthly 1993 December / PSL Monthly Shareware CD-ROM (December 1993).iso / prgmming / dos / asm / d4851z.com / D51.DOC < prev    next >
Encoding:
Text File  |  1990-08-04  |  6.6 KB  |  135 lines

  1.  
  2. D51 8051/8052 Disassembler - Copyright 1990 by Jeffery L. Post
  3. Version 1.0 - June 24, 1990
  4. Version 1.1 - Aug 4, 1990
  5.  
  6.     D51 is a cross disassembler for MSDOS machines. It generates an 8051
  7. assembly source code file from either a binary file or an Intel hex file.
  8. The executable code for D51 is public domain. The C source code for this
  9. program is NOT public domain but may be purchased from the author for
  10. personal or educational use only. To obtain the C source on a standard
  11. 360K MSDOS 5 1/4" diskette, send $10 cash, check, or money order to:
  12.  
  13.         Jeffery L. Post
  14.         22726 Benner Ave.
  15.         Torrance, CA  90505
  16.  
  17. The executable program may be freely distributed through public domain
  18. channels (bulletin boards, PD software houses, friends, etc) provided
  19. this documentation file is included.
  20.  
  21.     Command line format is: d51 filename [options]. The filename should
  22. be entered without an extension. The default extension is HEX. If the 'b'
  23. (binary file) option is used, the default extension is BIN. The 'd' (data)
  24. option will append a comment field to each assembly line consisting of the
  25. address of the instruction and hex and ascii representations of the code
  26. byte(s). Option entry is freeform: 'db' 'd b' '-bd' '-b -d' all mean the
  27. same thing.
  28.  
  29.     Version 1.1 - Now allows user to specify a hexadecimal offset to be
  30. added to the program data. This is done by using the 'x' option on the
  31. command line, ie: 'd51 file -d b x100'. The hexadecimal offset (100h in
  32. this example) will be added to all data read from either a .bin or .hex
  33. file. While this is not very useful when applied to a .hex file, it may
  34. be of critical importance in some .bin files (for example: a program for
  35. a single processor contained in two or more eproms). If used, the x option
  36. must be the last specified in the command line.
  37.  
  38.     D51 does three passes over the code being disassembled. The first pass
  39. searches for opcodes that reference program locations (such as jumps and
  40. calls) so that labels may be generated in the source listing. Pass two does
  41. the actual disassembly and writes source lines to the output file. Pass three
  42. then searches for references to locations outside of the initialized program
  43. space or to locations that lie in the middle of opcodes and generates equate
  44. statements for them.
  45.  
  46.     All three passes display the 'current pc' as they do their work. Despite
  47. the three pass design of D51, it is a very fast disassembler. It will dis-
  48. assemble an 8K binary file, outputing a 58K assembly source file, in about
  49. 20 seconds on an 8 MHz machine.
  50.  
  51.     D51 is an 'intelligent' disassembler. Since uninitialized space in a
  52. program will normally be filled with either 0 or 0ffh, blocks of such data
  53. will not be disassembled as page after page of NOP or MOV A,R7. They will
  54. be skipped over and an ORG statement will be inserted in the assembly output
  55. when the next initialized code is encountered.
  56.  
  57.     References to special function registers will generate names for the
  58. appropriate register, ie: 75 98 20 will be disassembled as 'mov scon,#20h'
  59. instead of just 'mov 98h,#20h'. Likewise, references to sfr bits will
  60. produce names: C2 AF disassembles as 'clr ea', not 'clr ie.7'. As a conven-
  61. ience to 8051 programmers, direct references to registers generate names
  62. for the register. For example, F5 12 becomes 'mov rb2r2,a' to indicate r2
  63. of register bank 2 at address 12h. This obviously requires that the programmer
  64. add an equate statement to the file before sending it back through an 8051
  65. cross assembler.
  66.  
  67.     Not all cross assemblers recognize the additional special function
  68. registers of all 8052 family members. Since D51 generates the proper sfr
  69. name for all family members known to the author, the programmer may have
  70. to add some equates defining such sfrs, ie:
  71.         t2con   equ     0c0h
  72.         csr     equ     0e8h
  73. and equates for the bits in the additional sfrs:
  74.         tf2     bit     t2con.7
  75.         mb0     bit     csr.6
  76.  
  77.     Despite all it's wonderfulness, D51 does have some drawbacks. Chief among
  78. them is that it does not try to analyze program flow, and therefore cannot
  79. tell the difference between valid executable code, data tables, and/or ascii
  80. data. This can lead to some strange looking disassembly when ascii data or
  81. address tables are encountered. The 'd' option is useful for identifying such
  82. problems.
  83.  
  84.     Comments, suggestions, bug reports, praise, or diatribes of any kind may
  85. be sent to the author at the address given above.
  86.  
  87.  
  88.  
  89.          ----------------end-of-author's-documentation---------------
  90.  
  91.                          Software Library Information:
  92.  
  93.                     This disk copy provided as a service of
  94.  
  95.                            Public (software) Library
  96.  
  97.          We are not the authors of this program, nor are we associated
  98.          with the author in any way other than as a distributor of the
  99.          program in accordance with the author's terms of distribution.
  100.  
  101.          Please direct shareware payments and specific questions about
  102.          this program to the author of the program, whose name appears
  103.          elsewhere in  this documentation. If you have trouble getting
  104.          in touch with the author,  we will do whatever we can to help
  105.          you with your questions. All programs have been tested and do
  106.          run.  To report problems,  please use the form that is in the
  107.          file PROBLEM.DOC on many of our disks or in other written for-
  108.          mat with screen printouts, if possible.  PsL cannot debug pro-
  109.          programs over the telephone, though we can answer questions.
  110.  
  111.          Disks in the PsL are updated  monthly,  so if you did not get
  112.          this disk directly from the PsL, you should be aware that the
  113.          files in this set may no longer be the current versions. Also,
  114.          if you got this disk from another vendor and are having prob-
  115.          lems,  be aware that  some files may have become corrupted or
  116.          lost by that vendor. Get a current, working disk from PsL.
  117.  
  118.          For a copy of the latest monthly software library newsletter
  119.          and a list of the 2,000+ disks in the library, call or write
  120.  
  121.                            Public (software) Library
  122.                                P.O.Box 35705 - F
  123.                             Houston, TX 77235-5705
  124.  
  125.                                 1-800-2424-PSL
  126.                                  MC/Visa/AmEx
  127.  
  128.                           Outside of U.S. or in Texas
  129.                           or for general information,
  130.                               Call 1-713-524-6394
  131.  
  132.                           PsL also has an outstanding
  133.                           catalog for the Macintosh.
  134.  
  135.